import { ImageInfo } from '@p/main-windowObject';

export function getImgSrc(obj: ImageInfo) {
	switch (obj.type) {
		case 'absolute':
		case 'relative':
			return obj.localReference;
		case 'url':
			if (obj.base64URL) {
				return obj.base64URL;
			} else {
				return obj.target;
			}
	}
}
